package com.yixing.demo.test;

import io.jsonwebtoken.SignatureAlgorithm;
import io.jsonwebtoken.io.Encoders;
import io.jsonwebtoken.security.Keys;
import org.junit.jupiter.api.Test;

import javax.crypto.SecretKey;
import java.security.KeyPair;

public class getJwtKey {
    @Test
    void test1() {
        SecretKey secretKey = Keys.secretKeyFor(SignatureAlgorithm.HS256);
        String encodeKey = Encoders.BASE64.encode(secretKey.getEncoded());
        System.out.println(encodeKey);
    }
}
